﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using A2DFramework.ValidationService;

namespace A2DFramework.BusinessExceptionService.Helpers
{
    internal class ErrorMessageHelper
    {
        private List<BrokenRule> errors;

        public ErrorMessageHelper(List<BrokenRule> errors) 
        {
            this.errors = errors;
        }

        public void AddErrorMessage(string fieldName, string msg)
        {
            this.errors.Add(new BrokenRule() { Key=fieldName, Message=msg });
        }
    }
}
